<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<div th:fragment="markdown">
    <link rel="stylesheet" href="/static/plugin/markdown/css/editormd.css"/>
    <script type="text/javascript" src="/static/js/jquery.js"></script>
    <script type="text/javascript" src="/static/plugin/markdown/editormd.min.js"></script>

    <link rel="stylesheet" href="/static/plugin/markdown/css/editormd.preview.css"/>
    <script src="/static/plugin/markdown/lib/marked.min.js"></script>
    <script src="/static/plugin/markdown/lib/prettify.min.js"></script>

    <script type="text/javascript">
        $(function () {
            const editor = editormd("question-editor", {
                width: "100%",
                height: 400,
                path: "/static/plugin/markdown/lib/",
                watch: false,
                placeholder: "请输入问题描述...",
                imageUpload: true,
                imageFormats: ["jpg", "jpeg", "gif", "png", "bmp", "webp"],
                imageUploadURL: "/file/img/upload",
            });
            const testView = editormd.markdownToHTML("question-markdown-view");
        });
    </script>
</div>
</html>